package com.cn.byjk.Controller;

import com.cn.byjk.service.ForeignExchangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

@RestController
@RequestMapping("/foreign")
public class ForeignExchangeController {
    @Autowired
    private ForeignExchangeService foreignExchangeService;

    @GetMapping("/getMoney/{userid}")
    public BigDecimal getMoney(@PathVariable("userid") Long userid){
       return foreignExchangeService.getMoney(userid);
    }

}
